<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- inc:inc.head -->
<script src="js/base64.js" type="text/javascript"></script>
<script>
function send_mailapi()
{
	//数据编码
	var base = new Base64();
	mailadd = base.encode("xxxxxxxxxx@qq.com"); //接收方邮箱地址
	mailtit = base.encode("你好啊"); //邮件标题
	username = base.encode("陈先生"); //要发送的数据[姓名]
	email = base.encode("ovasd@qq.com"); //要发送的数据[邮箱]
	tel = base.encode("131234564"); //要发送的数据[电话]
	content = base.encode("留言内容"); //要发送的数据[留言]
	returnlink = base.encode("www.sy118.com"); //记录的哪个网站发出的邮件
	
	$.ajax({
	type:"post",
	url:"http://sendmail.sangyo.cc/form.php",
	data:{"act":"send","mailadd":mailadd,"mailtit":mailtit,"username":username,"email":email,"tel":tel,"content":content,"returnlink":returnlink,"ifapi":"1"},
	dataType:"json"
	});
	
	alert("邮件发送成功");
}
</script>
</head>

<body>

<!-- inc:inc.top -->

<div class="margin padding_tb">
  <button class="gbutton" onclick="send_mailapi()">API发送邮件</button>
</div>

<!-- inc:inc.footer -->

</body>
</html>